package com.act.moudles.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.act.moudles.user.entity.SecretKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 密钥(SecretKey)表数据库访问层
 *
 * @author makejava
 * @since 2023-05-18 11:09:01
 */
@Mapper
public interface SecretKeyDao extends BaseMapper<SecretKey> {

    /**
     * 根据密钥查询
     * @param secret
     * @return
     */
    SecretKey  selectByValue(@Param("secret") String secret,
                            @Param("userId") Long userId);


    /**
     * 根据密钥查询
     * @param secret
     * @return
     */
    SecretKey  selectByKey(@Param("secret") String secret);

}

